package com.wantup.miaosha.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Zhaoluowei
 * @version 1.0
 * @date 2019/6/4 16:38
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class UserPojo implements Serializable {

    //有系统定义好的注解、还可以自定义注解
    @NotNull
    @Length(max = 11,min = 11,message = "手机号位数不对")
    private String name;

    private String password;

}
